home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / netconnect3 / amtalk-2 / install_amtalk-2 < prev    next >
Text File  |  1999-07-30  |  36KB  |  862 lines

  1. ;******************************************************************************
  2. ;      ____           ______        __   __             ______ ______
  3. ;     / __ \         /_  __/       / /  / /__          /_  __//_  __/
  4. ;    / /_/ /_   _     / /  ______ / /  / // /           / /    / /
  5. ;   / __  // \_/ \   / /  / __  // /  / _  / ______    / /    / /
  6. ;  / / / // /__/ /  / /  / __  // /_ / /| | /_____/ __/ /_ __/ /_
  7. ; /_/ /_//_/  /_/  /_/  /_/ /_//___//_/ |_|        /_____//_____/     
  8.  
  9.  
  10. ;Here it is. The only major change is new drawer "Samples". The names of all
  11. ;files were replaced by "AmTalk-2" (executable, keyfile, guide, docs etc),
  12. ;so please update the script to reflect that change. Please also update
  13. ;the copyright dates etc. The MUI classes, guides and amtalk itself are
  14. ;outdated here, but that's makes no difference for you ;)
  15.  
  16. ; $VER: AmTalk-II_Installer 1.05b (July-19-1999) 
  17. ; NetInfo-II by Marcin Orlowski ©1999
  18. ; Installer by Robert C. Reiswig ©1997, 1998, 1999
  19. ;
  20. ; If you wish to use any part of this installer you must ask. May not be 
  21. ; integrated/placed into any other package. You may NOT change this in an way!
  22. ; Changes, suggestions or problems: netinfo-II@vgr.com or rob@vapor.com
  23. ;******************************************************************************
  24.  
  25. ;*** System Stuff ***
  26. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  27. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  28. (set osver (/ (getversion "LIBS:version.library") 65536))
  29. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  30. (set fastmem (- totmem graphmem))
  31.  
  32. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  33. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  34. (if (= osver 41) (set workbench "3.2"))
  35.  
  36. (set cpu (database "cpu"))
  37. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  38. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  39. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  40. (if (= cpu 68040) (set #cpu 4)) (if (= cpu 68040) (set #cpu 5))
  41. (if (= cpu 68060) (set #cpu 5)) 
  42.  
  43. (set vernum1 (getversion "AmTalk-2")) (set ver1 (/ vernum1 65536)) 
  44. (set rev1 (- vernum1 (* ver1 65536) ) ) (set AmTalkver (cat ver1 "." rev1))
  45. (set AmTalk_Dir "") (if (> (exists ("env:AmTalk_Dir")) 0) (set AmTalk_Dir (getenv "AmTalk_Dir")) )
  46.  
  47. (set mfound 0) (set newicon1 1) 
  48. (set keeper 1) (set firsttime 0)
  49.  
  50. ;********************************************************************
  51. ; English Strings
  52. ;********************************************************************
  53. (set #about (cat "\n\n" 
  54.                  "Welcome to\n\n"
  55.                  "AmTalk-2 " AmTalkver "\n\n"
  56.                  "Copyright ©1999 by Oliver Wagner & Marcin Orlowski\n\n"
  57.             ) 
  58. )
  59. (set #nomui (cat "\n\nAmTalk-2 uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  60.                  "therefore you AmTalk-2 will not work correctly.  You will need to install "
  61.                  "MUI before running AmTalk-2."
  62.             )
  63. )
  64. (set #whereAmTalk "Where do you wish to install AmTalk-2. A directory called 'AmTalk-2' will be created if one is not there. If a copy of AmTalk-2 is found it will be backed up.")
  65. (set muiver "No Version Installed")
  66. (set #newermui "\n\nAmTalk-2 needs version 3.6 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\n It looks like you have: \n\n")
  67. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by AmTalk-2 were not installed.\n\n If you are Updating AmTalk-2 then this is not a problem. If it is your first time installing AmTalk-2 you will need to get an archive with these files.")
  68. (set #nompc "\nThe .MPC files for Voyager can not be installed to 'mui:libs/mui'")
  69. (set #need-os "\n\nThe 68020 version of AmTalk-2 needs version 3.6 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  70. (set #000used "\n\nThe 68000 version will be installed.") 
  71. (set #filethere1 "\n\nThe installer has found AmTalk-2 version ")
  72. (set #filethere2 " at ")
  73. (set #filethere3 "\n\nThe file will be renamed to ")
  74. (set #filethere4 " and it will then be moved to ")
  75. (set #oktodelete1 "\nIs it ok to delete the older AmTalk-2 binary so that the AmTalk-2 Directory can be made?\n")
  76. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ AmTalk-2 binary so that the AmTalk-2 Directory can be made?\n")
  77. (set #backuptoXXX "Back-UP to file named 'AmTalk-2")
  78. (set #copyover "Copy Over Old Version")
  79. (set #AmTalkfound "\nThe Installer has found a copy of AmTalk-2 already installed. What do you want to do?\n")
  80. (set #whereback "Where would you like to BackUp AmTalk-2 to?")
  81. (set #askcpu "\nCPU Check: What CPU does the machine have that you are installing AmTalk-2 on? The installer has found:\n")
  82. (set #no020found "\n\nThe 68020 Version of AmTalk-2 , AmTalk-2020, was not found in this archive the 68000 version was installed.")
  83. (set #newicon "\nDo you wish to copy over one of the AmTalk-2 Icons from the archive? If you have any ToolTypes already set you should select no.\n")
  84. (set #pickicon "\nAmTalk-2 has a number of different icons you can choose from. Which one would you like to use?\n")
  85. (set #nonewicon  "No  - ToolTypes already set.")
  86. (set #yesnewicon "Yes - Copy over Icon.")
  87. (set #whatcat "Select the AmTalk-2 Language catalog you wish to install. (N/A = Not Available in this Archive.)")
  88. (set #wherecat "\nWhere do you wish to install the AmTalk-2 Language Catalog? Default is ")
  89. (set #catnofind "Can not find this catalog in this AmTalk-2 archive. You may need to get the complete archive from the support site.")
  90. (set #whatdocs "\nWhat AmTalk-2 documentation would you like to install?\n")
  91. (set #wheredocs "Where would you like the AmTalk-2 documentation you selected to be installed?")
  92. (set #byebye (cat "\nAmTalk-2 Install Complete!\n\n" ))
  93.  
  94. (set #inetdfound "The install has found that a Inetd.conf is installed for AmiTCP or AS225/IW225/CPR225.  In order for AmTalk-2 to work correctly the 'ntalk' & 'talk' entries must be commented out or removed. The installer can *comment* out the entries if they are found.\n\nIf you are running a 'TCP/IP' package like Miami or TTCP you have to do this manually for their stuff.")
  95. (set #skipinetd "\n\n(You can Skip this now if you have already changed your Inetd.conf or you have let the installer do this before.)") 
  96. (set #skip "Skip - Do later")
  97. (set #comment "Have Installer Do It")
  98. (set #ifucomment "\n\nIf you had commented out or removed the\n'talk  517/udp' & 'ntalk  518/udp'\n entries in your db/services file, you will need to add them back in. By default they should already be there.")
  99. (set #manualchange "\n\nCurrently the AmTalk-2 installer does not edit or change the 'DataBase' list or config-file for server entries. If your TCP/IP package is setup for using another TALK client you must remove that other clients entries by hand for AmTalk-2 to work correctly.")
  100.  
  101.  
  102. (set #updatedlibs "\nInstall/Update the Vapor Libraries?\n* = Must be installed to work correctly\n(Click 'Help' for more info on the libs.)\n")
  103. (set #lib1 " Update library (*)")
  104. (set #lib2 " Toolkit library (*)")
  105. (set #lib3 " Registration library")
  106. (set #libhelp1 "vapor_update.library:\nIf installed every Vapor app will automagically check for updates by querying the Vapor server via Internet. You will be informed and offered automatic downloading if there is an update.")
  107. (set #libhelp2 "\n\nvapor_toolkit.library (* Must be installed):\nContains support functions which are used by most Vapor applications and thus can be shared to reduce individual application code size. ie: Async I/O library, crytographically strong random number generator, math support.")
  108. (set #libhelp3 "\n\nvapor_registration.library (* Must be installed):\nContains the core code for the registration utility\n")
  109. (set #wherelibs "Where do you wish to place the Vapor lib(s), 'Libs:' is default.")
  110. (set #flushing "\n\nRunning:\n\n'avail flush >NIL:'\n\n to try to flush old Vapor libraries from memory.")
  111.  
  112. (set #insregstuff " Install Register information")
  113. (set #insregstuffno " Don't Install Register information")
  114. (set #installerreg "\nThe installer did not find an AmTalk-2 key in the usual places. Do you wish to install the Register information?\n") 
  115.  
  116. (set #wantbuttons "\nThe installer has found that the directory 'Samples' exist. Do you still wish to install the default sound Samples? If you have created your own you should select 'No'.\n")
  117. (set #yesbutton "Yes - Copy default Sound Samples over")
  118. (set #nobuttons "No - Use currently installed Samples")
  119.  
  120.  
  121. ;********************************************************************
  122. ; Hello
  123. ;********************************************************************
  124. (message #about)
  125. (welcome) 
  126. (message "The AmTalk-2 installer has not been test with every TCP package currently. It has been tested with & works with Amitcp 3.0b2 & 4.0. There are to many options to test with 4 TCP stacks & all the different config files. If you have any problems email amtalkinst@vgr.com.\n\nThe installer will copy the files to the correct place, but as far as setting up non-Amitcp config files the installer does not do this as of yet & and says so. It does set the ENVARC MiamiChangeDB & does the arexx command CHANGEDB for Miami.")
  127.  
  128. ;********************************************************************
  129. ; Check on New installer 
  130. ;********************************************************************
  131. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can. The AmTalk-2 installer will need it.")
  132. (set InstallerVer 0)
  133. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  134. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  135. (set current_installer "43.3")
  136. (if (< InstallerVer current_installer) (message #updateinstaller) )
  137.  
  138. ;********************************************************************
  139. ; MUI installed?
  140. ;********************************************************************
  141. (if (< (exists "mui:") 2)  (message #nomui) )
  142.  
  143. ;********************************************************************
  144. ; Check for AmTalk-2 requs
  145. ;********************************************************************
  146. (set ver 0) 
  147. (if (exists "mui:mui") 
  148.  (
  149.   (set vernum (getversion "mui:mui") )
  150.   (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  151.  
  152.   (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  153.   (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  154.   (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  155.   (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  156.   (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  157.   (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  158.   (if (= ver 19) (set muiver "3.8") )  (if (= ver 20) (set muiver "3.9") )
  159.  )
  160. )
  161.  
  162. (if (< ver 17)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  163. ;(if (< osver 39) ( (message (cat #need-os workbench #000used)) (set cpuPick 0) ))
  164.  
  165. ;******************************************************************************** 
  166. ; What TCP/IP package
  167. ;********************************************************************************
  168. (set #whattcp "\nPlease select the Networking package you run.\n")
  169. (set #nottcp "\n\nCurrently Termite TCP does not work with AmTalk-2.\n\nIt's known that certain TermiteTCP versions don't properly emulate bsdsocket.library. Use it on your own risk.")
  170. (set #nomlink "\n\nCurrently Mlink does not work with AmTalk-2. AmTalk-2 needs access to root ports, currently Mlink does not provide this.")
  171.  
  172. (set Package (getassign "AmiTCP"))  (if (= Package "") (set Package (getassign "Inet")) )
  173. (if (<> (getassign "AmiTCP") "") (set guesspackage 0))
  174.  
  175. (if (exists "Miami:" (noreq)) (set guesspackage 2))
  176.  
  177. (set TCP  (askchoice (choices "AmiTCP (3.0b2, 4.x)" "AS225R2/IW225/CPR225" "Miami" "Termite TCP" "MultiLink (Mlink)")
  178.                      (prompt #whattcp)
  179.                  (help   #whattcp)
  180.                      (default guesspackage)
  181.       )
  182. )
  183.  
  184. (if (= TCP 0) (set Package "AmiTCP:") )   
  185. (if (= TCP 1) (set Package "Inet:") )
  186. (if (= TCP 2) (set Package "Miami:") )
  187. (if (= TCP 3) ( (set Package "Work:") (message #nottcp)) )    
  188. (if (= TCP 4) (abort #nomlink) ) 
  189. (if (= AmTalk_Dir "") (set AmTalk_Dir Package))  
  190.  
  191. ;********************************************************************
  192. ; Check Last ENV
  193. ;********************************************************************
  194. (if (> (exists "env:Vapor/AmTalk-2_LASTUSEDDIR") 0) 
  195.  (
  196.   (set lastdir (getenv "Vapor/AmTalk-2_LASTUSEDDIR"))
  197.   (set lastdirlen (strlen lastdir))
  198.   (set tricklen (+ 1 (strlen (fileonly lastdir))))
  199.   (set lastdir (substr lastdir 0 (- lastdirlen tricklen) ) )
  200.   (if (= 0 (exists lastdir (noreq))) (set lastdir (cat lastdir ":"))) 
  201.  )
  202.  (set lastdir 0)
  203. )
  204. (if (<> lastdir 0) (set AmTalk_Dir Package))
  205.  
  206. ;********************************************************************
  207. ; Ask where to put AmTalk & Make dir if needed
  208. ;********************************************************************
  209. (set AmTalkdir  (askdir (prompt #whereAmTalk)
  210.                 (help   #whereAmTalk)
  211.                      (default AmTalk_Dir)
  212.                )  
  213. )
  214.  
  215. (set where AmTalkdir)
  216.  
  217. (if (= 1 (exists (tackon where "AmTalk-2") ) ) 
  218.   (
  219.     (set vernum1 (getversion (tackon where "AmTalk-2") ))
  220.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  221.     (set AmTalk_old (cat ver1 "." rev1))
  222.  
  223.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  224.                   (cat "AmTalk-2" AmTalk_old) #filethere4 (tackon AmTalkdir "AmTalk-2") )
  225.     )
  226.  
  227.     (copyfiles (source (tackon where "AmTalk-2"))
  228.                (dest where) 
  229.                (infos)
  230.                (newname (cat "AmTalk-2" AmTalk_old))
  231.     )
  232.  
  233.     (delete (tackon AmTalkdir "AmTalk-2") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  234.  
  235.     (if (< (exists (tackon AmTalkdir "AmTalk-2")) 2) (makedir (tackon AmTalkdir "AmTalk-2") (infos)) )    
  236.  
  237.     (copyfiles (source (tackon where (cat "AmTalk-2" AmTalk_old) ))
  238.                        (dest (tackon AmTalkdir "AmTalk-2")) 
  239.                        (infos)
  240.                
  241.     )
  242.  
  243.     (delete (tackon where (cat "AmTalk-2" AmTalk_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  244.  
  245.     ;(set firsttime 1)
  246.  
  247.   )
  248. )
  249.  
  250. (if (< (exists (tackon AmTalkdir "AmTalk-2")) 2) (makedir (tackon AmTalkdir "AmTalk-2") (infos)) )
  251.  
  252. ;(if (< (exists "env:Vapor") 2) (makedir "env:Vapor") )    
  253. ;(if (< (exists "envarc:Vapor") 2) (makedir "envarc:Vapor") )    
  254. ;(run (cat "setenv Vapor/AmTalk-2 " where))
  255. ;(copyfiles (source "env:Vapor/AmTalk-2")  (dest "envarc:Vapor") )
  256.  
  257. ;********************************************************************
  258. ; copy rooticon if there
  259. ;********************************************************************
  260. (set pathI @icon)  (set pathIlen (strlen pathI))
  261. (set Inamelen (fileonly @icon))
  262. (set Inamelen (+ (strlen Inamelen) 1) )
  263. (set pathI (substr pathI 0 (- pathIlen Inamelen) ) )
  264.  
  265. (if (exists (cat pathI ".info"))
  266.   (copyfiles (source (cat pathI ".info")) (dest (tackon "/" where)) (newname "AmTalk-2.info") (optional "nofail") ) 
  267. )
  268.  
  269. (set where (tackon AmTalkdir "AmTalk-2"))
  270. (set @default-dest where)
  271.  
  272.  
  273. ;********************************************************************
  274. ; Check for old & backup
  275. ;********************************************************************
  276. (if (exists (tackon where "AmTalk-2")) 
  277.   (
  278.       (set vernum1 (getversion (tackon where "AmTalk-2") ))
  279.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  280.       (set AmTalk_old (cat ver1 "." rev1))
  281.  
  282.       (set keeper  (askchoice (choices  (cat #backuptoXXX AmTalk_old "'")  #copyover)
  283.                      (prompt #AmTalkfound)
  284.                  (help   #AmTalkfound)
  285.                      (default 0)
  286.                )
  287.       )    
  288.  
  289.  
  290.       (if (= keeper 0)
  291.         (set whereback  (askdir (prompt #whereback)
  292.                                 (help   #whereback)
  293.                                 (default where) 
  294.                         )
  295.         )
  296.  
  297.         (copyfiles (source (tackon where "AmTalk-2"))
  298.                            (dest where) 
  299.                            (infos)
  300.                            (newname (cat "AmTalk-2" AmTalk_old)
  301.                    )
  302.         )
  303.       )          
  304.  
  305.       (set firsttime 1)
  306.     
  307.   )
  308. )
  309.  
  310. ;********************************************************************
  311. ; Copy over correct AmTalk-2 and Icon if wanted
  312. ;********************************************************************
  313. (if (AND (> cpuPick 1) (exists ("AmTalk-2020")) )
  314.    (copyfiles (source "AmTalk-2020") (dest where) (optional "nofail") (newname "AmTalk-2") )
  315.  
  316.    (copyfiles (source "AmTalk-2") (dest where) (optional "nofail") )
  317. )
  318.  
  319. (run (cat "setdate " (tackon where "AmTalk-2")))
  320.  
  321. (if (OR (= keeper 0) (= firsttime 0))
  322.   (
  323.   
  324.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  325.                            (prompt #newicon)
  326.                        (help   #newicon)
  327.                            (default 0)
  328.             )
  329.    )
  330.  
  331.    (if (= newicon 0) 
  332.      (copyfiles (source "AmTalk-2.info") (dest where) (newname "AmTalk-2.info") (optional "nofail") )
  333.    )
  334.   )
  335. )
  336. ;********************************************************************
  337. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  338. ;********************************************************************
  339. (if (<> (getassign "mui") "")
  340. (
  341.   (if (> (exists "mui:libs/mui") 0) 
  342.    (
  343.     (if (= (exists "mui") 2)
  344.      (
  345.         (working #updatingmuic)
  346.   
  347.         (foreach "mui" "#?.mcp"
  348.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  349.         )
  350.     
  351.         (foreach "mui" "#?.mcc"
  352.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  353.         )
  354.      )
  355.  
  356.      (message #nomuiarc)
  357.  
  358.     )
  359.    
  360.    )
  361.  
  362.    (message (cat #newermui muiver #nompc)) 
  363.   )
  364. )
  365. )
  366.  
  367.  
  368. ;********************************************************************
  369. ; Select and copy over AmTalk-2 Catalog
  370. ;********************************************************************
  371. (if (> (exists "catalogs") 0) 
  372. (
  373. (set XX 0) (set lan 0)
  374. (foreach "Catalogs" "#?"
  375.  (
  376.   (set XX (+ XX 1)) 
  377.   (textfile (dest (cat "ENV:i.høld." XX)) (append @each-name) ) 
  378.   (if (= lanfound @each-name) (set lan XX))
  379.  
  380.   (if (= (patmatch "#?.c#?" @each-name) 1) 
  381.      ( (delete (cat "ENV:i.høld." XX)) (set XX (- XX 1))  )
  382.   )
  383.  
  384.  )
  385. )
  386.  
  387. (set l1 "N/A") (set l2 "N/A") (set l3 "N/A") (set l4 "N/A") (set l5 "N/A")
  388. (set l6 "N/A") (set l7 "N/A") (set l8 "N/A") (set l9 "N/A") (set l10 "N/A")
  389. (set l11 "N/A") (set l12 "N/A") (set l13 "N/A") (set l14 "N/A") (set l15 "N/A") 
  390.  
  391. (set l0 "English")
  392. (if (> (exists ("ENV:i.høld.1")) 0)   (set l1 (getenv "ENV:i.høld.1")) ) (if (> (exists ("ENV:i.høld.2")) 0)   (set l2 (getenv "ENV:i.høld.2")) )
  393. (if (> (exists ("ENV:i.høld.3")) 0)   (set l3 (getenv "ENV:i.høld.3")) ) (if (> (exists ("ENV:i.høld.4")) 0)   (set l4 (getenv "ENV:i.høld.4")) )
  394. (if (> (exists ("ENV:i.høld.5")) 0)   (set l5 (getenv "ENV:i.høld.5")) ) (if (> (exists ("ENV:i.høld.6")) 0)   (set l6 (getenv "ENV:i.høld.6")) )
  395. (if (> (exists ("ENV:i.høld.7")) 0)   (set l7 (getenv "ENV:i.høld.7")) ) (if (> (exists ("ENV:i.høld.8")) 0)   (set l8 (getenv "ENV:i.høld.8")) )
  396. (if (> (exists ("ENV:i.høld.9")) 0)   (set l9 (getenv "ENV:i.høld.9")) ) (if (> (exists ("ENV:i.høld.10")) 0) (set l10 (getenv "ENV:i.høld.10")) )
  397. (if (> (exists ("ENV:i.høld.11")) 0) (set l11 (getenv "ENV:i.høld.11")) )(if (> (exists ("ENV:i.høld.12")) 0) (set l12 (getenv "ENV:i.høld.12")) )
  398. (if (> (exists ("ENV:i.høld.12")) 0) (set l13 (getenv "ENV:i.høld.13")) )(if (> (exists ("ENV:i.høld.14")) 0) (set l14 (getenv "ENV:i.høld.14")) )
  399. (if (> (exists ("ENV:i.høld.15")) 0) (set l15 (getenv "ENV:i.høld.15")) )(if (> (exists ("ENV:i.høld.16")) 0) (set l15 (getenv "ENV:i.høld.16")) )
  400. (run "delete env:i.høld.#?")
  401.  
  402. (set catalog (askchoice (choices l0 l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11)            
  403.                         (prompt #whatcat)
  404.                     (help   #whatcat)
  405.                         (default lan)
  406.              )
  407. )
  408.  
  409. (if (= catalog 0)  (set #lcat l0))  
  410. (if (= catalog 1)  (set #lcat l1))  (if (= catalog 2)  (set #lcat l2))  (if (= catalog 3)  (set #lcat l3))  
  411. (if (= catalog 4)  (set #lcat l4))  (if (= catalog 5)  (set #lcat l5))  (if (= catalog 5)  (set #lcat l5))
  412. (if (= catalog 6)  (set #lcat l6))  (if (= catalog 7)  (set #lcat l7))  (if (= catalog 8)  (set #lcat l8))  
  413. (if (= catalog 9)  (set #lcat l9))  (if (= catalog 10) (set #lcat l10)) (if (= catalog 11) (set #lcat l11))
  414. (if (= catalog 12) (set #lcat l12)) (if (= catalog 13) (set #lcat l13)) (if (= catalog 14) (set #lcat l14)) 
  415. (if (= catalog 15) (set #lcat l15)) (if (= catalog 16) (set #lcat l16))
  416.  
  417.  
  418. (if (AND (<> catalog 0) (<> #lcat "N/A"))
  419.  (
  420.   (if (> (exists (cat "Catalogs/" #lcat "/AmTalk-2.catalog")) 0)
  421.     (
  422.         (set wherecat  (askchoice (choices (tackon where (cat "Catalogs/" #lcat)) (cat "Locale:Catalogs/" #lcat) )
  423.                                   (prompt (cat #wherecat (tackon where (cat "Catalogs/" #lcat)) "\n"))
  424.                             (help   #wherecat)
  425.                                (default 0)
  426.                        )  
  427.         )
  428.  
  429.       (if (= wherecat 1)
  430.         (
  431.          (if (< (exists "Locale:") 2) ( (makedir "sys:Locale") (makeassign "Locale" "sys:Locale") ) )
  432.          (if (< (exists "Locale:Catalogs") 2) (makedir "sys:Locale/Catalogs") )
  433.          (if (< (exists (cat "Locale:Catalogs/" #lcat)) 2) (makedir (cat "sys:Locale/Catalogs/" #lcat)) )
  434.          (copylib (source (cat "Catalogs/" #lcat "/AmTalk-2.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  435.         )
  436.   
  437.         (
  438.          (if (< (exists (tackon where "Catalogs")) 2) (makedir (tackon where "Catalogs")) )
  439.          (if (< (exists (tackon where (cat "Catalogs/" #lcat)) ) 2) (makedir (tackon where (cat "Catalogs/" #lcat)) ) )
  440.          (copylib (source (cat "Catalogs/" #lcat "/AmTalk-2.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  441.         )
  442.       )
  443.  
  444.     )
  445.  
  446.     (message (cat "\nCatalogs/" #lcat "/AmTalk-2.catalog\n\n" #catnofind))
  447.   )
  448.  
  449.  )
  450. )
  451. ); End if Catalog dir
  452. ); 
  453.  
  454.  
  455. ;********************************************************************
  456. ; Ask and and copy docs if wanted!
  457. ;********************************************************************
  458. (set docs (askoptions (choices " AmTalk-2.readme" " AmTalk-2.doc" " AmTalk-2.guide") ;; " AmTalk-2.ps" " AmTalk-2.dvi" 
  459.                (prompt #whatdocs)
  460.                        (help #whatdocs)
  461.                    (default 31)
  462.       )
  463. )
  464.  
  465. (if (<> docs 0)
  466.  (
  467.    (set docsdir (askdir (prompt #wheredocs)
  468.                (help   #wheredocs)
  469.                     (default where)
  470.                 )  
  471.    )
  472.  
  473.    (if (IN docs 0) (copyfiles (source "AmTalk-2.readme") (dest docsdir) (infos) (optional "nofail") ) )
  474.    (if (IN docs 1) (copyfiles (source "AmTalk-2.doc") (dest docsdir) (infos) (optional "nofail") ) )
  475.    (if (IN docs 2) (copyfiles (source "AmTalk-2.guide") (dest docsdir) (infos) (optional "nofail") ) )
  476.    (if (IN docs 3) (copyfiles (source "AmTalk-2.ps") (dest docsdir) (infos) (optional "nofail") ) )
  477.    (if (IN docs 4) (copyfiles (source "AmTalk-2.dvi") (dest docsdir) (infos) (optional "nofail") ) )
  478.  
  479.  )
  480. )
  481.  
  482. ;AmTalk-2.ps and AmTalk-2.dvi
  483.  
  484. ;********************************************************************
  485. ; Handle talkd and/or ntalkd in inetd.conf
  486. ;********************************************************************
  487. (if (AND (exists (tackon Package "db/Inetd.conf")) (< TCP 2))
  488.  (
  489.    (set ntalkedit (cat "F UB/ntalk/\n"
  490.                         "E /ntalk/#ntalk/\n"
  491.                         "30P\n"
  492.                         "F UB/talk/\n"
  493.                         "E /talk/#talk/\n"
  494.                         "W\n"
  495.                    )
  496.    )
  497.    (textfile (dest "t:ntalk.edit") (append ntalkedit))
  498.  
  499.  
  500.    (set com  (askbool (prompt (cat #inetdfound #skipinetd))
  501.                       (help   (cat #inetdfound #skipinetd))
  502.                       (choices #comment #skip)
  503.              )
  504.    )
  505.  
  506.    (if (= com 1) 
  507.      (
  508.        (if (= TCP 0)
  509.        ( (set rs (cat "edit " (tackon Package "db/Inetd.conf") " WITH=t:ntalk.edit")) (run rs)
  510.          (set rs1 "break `status com amitcp:bin/inetd` F")   (run rs1)
  511.          (set rs1 "break `status com inetd` F")              (run rs1)
  512.        ))
  513.        (if (= TCP 1)
  514.        ( (set rs (cat "edit " (tackon Package "db/Inetd.conf") " WITH=t:ntalk.edit")) (run rs)
  515.          (set rs1 "break `status com inet:bin/inetd` F")   (run rs1)
  516.          (set rs1 "break `status com inetd` F")            (run rs1)
  517.        ))
  518.      )  
  519.    )
  520.  
  521.    (message #ifucomment)
  522.  
  523.  )
  524. )
  525.  
  526. (if (> TCP 2) (message #manualchange))
  527.  
  528. ;********************************************************************
  529. ; How to launch
  530. ;********************************************************************
  531. (set nofilef 0) (set wherei "")
  532. (set inetddefault 3)
  533. (if (= TCP 0) (set inetddefault 0))
  534. (if (= TCP 2) (set inetddefault 2))
  535.  
  536. (set #wi "AmTalk-2 can be started a few different ways, please pick one.")
  537. (set #wi0 " Entry in Inetd.conf (Amitcp Only)")
  538. (set #wi1 " Entry in startnet (Amitcp Only)")
  539. (set #wi2 " Add to Miami's 'Database'")
  540. (set #wi3 " None - Manual Start")
  541. (set #whereident "Please select the *Inetd.conf* file.")
  542. (set #add2 "\nThe installer will now add the AmTalk-2 entry to the end of your Inetd.conf file that you selected & will make a backup called 'Inetd.conf.AmTalk-2'.\n\n If you are running a 'TCP/IP' package like Miami or TTCP you have to do this manualy in its server-list or database files.\n\nIf you wish to add the entry by hand later select 'Skip' now.")
  543. (set #skip2 "Skip - Do by Hand")
  544. (set #comment2 "Have Installer Do It")
  545. (set #noinetdas225 "\n\nCurrently starting AmTalk-2 from db/Inetd.conf does not work please pick another option.")
  546. (set #noinetdother "\n\nThe TCP/IP stack you selected does not have a db/Inetd.conf. Please pick another option.")
  547. (set #noinetdas225S "\n\nCurrently starting from a script is not supported in the installer.")
  548. (set #noinetdotherS "\n\nThe TCP/IP stack you selected does not have a 'startnet' file. Please pick another option. You will need to add an entery by hand.")
  549. (set #wherestartnet "Please select the *startnet* file.")
  550. (set #add3 "\nThe installer will now create 'amitcp:bin/startAmTalk-2.rexx' and insert 1 line in your startnet file that will run AmTalk-2 when you start AmiTCP & it will make a backup called 'startnet.AmTalk-2'.\n\n If you are running a 'TCP/IP' package like Miami or TTCP you have to do this manualy in its "statnet" config/startup script\n\nIf you wish to add the entry by hand later select 'Skip' now.")
  551.  
  552. (procedure askinetd
  553.  (set wi (askchoice (choices #wi0 #wi1 #wi2 #wi3)            
  554.                     (prompt #wi)
  555.                     (help   #wi)
  556.                     (default inetddefault)
  557.          )
  558.  )
  559. )
  560.  
  561. (askinetd)
  562.  
  563. (if (AND (= wi 0) (= TCP 0))
  564.  (
  565.   (set wherei (tackon Package "db/Inetd.conf"))
  566.   (procedure nofile
  567.    (set wherei (askfile (prompt #whereident)
  568.                         (help   #whereident) 
  569.                         (default wherei)
  570.                )
  571.    )
  572.   )
  573.  
  574.   (nofile)
  575.   ;(if (= (exists wherei) 1) (set nofilef 1))  
  576.   ; (while (= nofilef 0)  (nofile) )
  577.    
  578.   (set wi1 (askbool (prompt #add2)
  579.                      (help  #add2)
  580.                      (choices #comment2 #skip2)
  581.             )
  582.   )
  583.    
  584.   (if (= wi1 1)
  585.    (
  586.     (if (= TCP 0) (set InetdAdd (cat "ntalk      dgram   udp wait   root    " (tackon where "AmTalk-2") " " (tackon where "AmTalk-2") " identd=1\n") ) )
  587.     
  588.     (textfile (dest "t:Inetd.add") (append InetdAdd))
  589.     (rename "amitcp:db/Inetd.conf" "amitcp:db/Inetd.conf.AmTalk-2")
  590.     (run ("join amitcp:db/Inetd.conf.AmTalk-2 t:Inetd.add to amitcp:db/Inetd.conf"))
  591.    )
  592.   )
  593.  
  594.  )
  595.  
  596.  
  597.  (
  598.    (if (= TCP 1) ((message #noinetdas225) (set identddefault 3) (askinetd)) )
  599.    (if (> TCP 2) ((message #noinetdother) (set identddefault 3) (askinetd)) ) 
  600.  )
  601.  
  602. )
  603.  
  604.  
  605. (if (AND (= wi 1) (= TCP 0))
  606.  (
  607.   (set wheres (tackon Package "bin/startnet"))
  608.   (procedure nofiles
  609.    (set wheres (askfile (prompt #wherestartnet)
  610.                         (help   #wherestartnet) 
  611.                         (default wheres)
  612.                )
  613.    )
  614.   )
  615.  
  616.   (nofiles)
  617.   
  618.   (set wi1 (askbool (prompt #add3)
  619.                      (help  #add3)
  620.                      (choices #comment2 #skip2)
  621.             )
  622.   )
  623.    
  624.   (if (= wi1 1)
  625.    (
  626.     (if (= TCP 0) 
  627.        (set snAdd (cat "/* Start AmTalk-2 */ \n"
  628.                        "IF SHOW('P','AmTalk-2')  THEN DO   //* Already there *// \n"
  629.                        "    DELAY(5)\n"
  630.                        "END\n"
  631.                        "ELSE DO\n"
  632.                        "    ADDRESS COMMAND 'run >nil: \"" (tackon where "AmTalk-2") "\"'\n" 
  633.                        "END\n" 
  634.                   ) 
  635.        )
  636.        (set snAdd1 "\nrx amitcp:bin/startAmTalk-2.rexx\n" ) 
  637.     )
  638.    
  639.      (textfile (dest "amitcp:bin/startAmTalk-2.rexx") (append snAdd))
  640.  
  641.      (textfile (dest "t:startnet.add") (append snAdd1))
  642.      (rename "amitcp:bin/startnet" "amitcp:bin/startnet.AmTalk-2")
  643.      (run ("join amitcp:bin/startnet.AmTalk-2 t:startnet.add to amitcp:bin/startnet"))
  644.      (run "protect amitcp:bin/startnet add s")
  645.    )
  646.  
  647.   )
  648.  
  649.  )
  650.  
  651.  
  652.   (
  653.     (if (= TCP 1) ((message #noinetdas225S) (set identddefault 3) (askinetd) ))
  654.     (if (> TCP 2) ((message #noinetdotherS) (set identddefault 3) (askinetd) )) 
  655.  
  656.   )
  657.  
  658.  
  659. )
  660.  
  661. (if (AND (< wi 2) (= TCP 2))
  662.    (  
  663.     (run "echo >>ENVARC:MiamiChangeDB \"ADD services ntalk 518/udp\"")
  664.     (run (cat "echo >>ENVARC:MiamiChangeDB \"ADD InetD ntalk dgram udp wait root " (tackon where "AmTalk-2") " AmTalk-2 identd=1\"")) 
  665.     (run "rx \"address MIAMI.1;CHANGEDB\"")
  666.    )
  667. )
  668.  
  669. ;********************************************************************
  670. ; copy Sample Sounds if there 
  671. ;********************************************************************
  672. (set samples 0)
  673.  
  674. (if (> (exists "Samples") 0)
  675.  (
  676.   (if (> (exists (tackon where "Samples")) 0)
  677.    (
  678.      (set samples (askchoice (choices #yesbutton #nobuttons)            
  679.                              (prompt #wantbuttons)
  680.                          (help   #wantbuttons)
  681.                              (default 1)
  682.                   )
  683.      )
  684.    )
  685.   )
  686.  
  687.   (if (= samples 0)
  688.    (
  689.     (if (< (exists (tackon where "Samples")) 2) (makedir (tackon where "Samples"))  )
  690.     (foreach "Samples" "#?.iff"
  691.       (if (< @each-type 0)
  692.        (copyfiles (source (tackon "Samples" @each-name)) (dest (tackon where "Samples")) (infos) (optional "nofail") ) 
  693.       )
  694.     )
  695.    )
  696.   )
  697.  
  698.  ) 
  699. )
  700.  
  701.  
  702.  
  703. ;********************************************************************
  704. ; Copy update Lib if wanted 
  705. ;********************************************************************
  706. (set deflibs 7)
  707. (if (> (exists "libs") 0)
  708.  (
  709.   (set deflibs 0)
  710.   (if (> (exists (tackon "libs" "vapor_update.library")) 0)       (set deflibs (+ deflibs 1)))
  711.   (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)      (set deflibs (+ deflibs 2)))
  712.   (if (> (exists (tackon "libs" "vapor_registration.library")) 0) (set deflibs (+ deflibs 4)))
  713.  
  714.   (set libPick (askoptions (choices #lib1 #lib2 #lib3)
  715.               (prompt #updatedlibs)
  716.                       (help   (cat #libhelp1 #libhelp2 #libhelp3))
  717.                     (default deflibs)
  718.            )
  719.   )
  720.  
  721.   (if (> libPick 0)
  722.    (
  723.     (set wherelibs (askdir (prompt #wherelibs)
  724.                   (help   #wherelibs)
  725.                        (default "LIBS:")
  726.                    )  
  727.     )
  728.     
  729.     (if (IN libPick 0)
  730.      (if (> (exists (tackon "libs" "vapor_update.library")) 0)
  731.       (copylib (source (tackon "libs" "vapor_update.library")) (dest wherelibs) (optional "nofail"))  
  732.      )
  733.     )
  734.  
  735.     (if (IN libPick 1)
  736.      (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)
  737.       (copylib (source (tackon "libs" "vapor_toolkit.library")) (dest wherelibs) (optional "nofail"))  
  738.      )
  739.     )
  740.  
  741.     (if (IN libPick 2)
  742.      (if (> (exists (tackon "libs" "vapor_registration.library")) 0)
  743.       (copylib (source (tackon "libs" "vapor_registration.library")) (dest wherelibs) (optional "nofail"))  
  744.      )
  745.     )
  746.  
  747.    (working #flushing)
  748.    (run "avail flush > NIL:")
  749.    (run "avail flush > NIL:")
  750.    (run "avail flush > NIL:")
  751.  
  752.    )
  753.  
  754.   )
  755.  )
  756. )
  757.  
  758. ;********************************************************************
  759. ; Reg stuff Register-AmTalk-2
  760. ;********************************************************************
  761. (procedure checkforkey
  762.  (set foundkey 0) 
  763.  (set kc "amtalk-2.key")
  764.  
  765.  (if (exists kc (noreq)) (set foundkey 1) )
  766.  (if (exists (tackon where kc) (noreq)) (set foundkey 1) )
  767.  (if (exists (tackon "s:" kc) (noreq)) (set foundkey 1) )
  768.  (if (exists (tackon "l:" kc) (noreq)) (set foundkey 1) )
  769.  (if (exists (tackon "libs:" kc) (noreq)) (set foundkey 1) )
  770.  (if (exists (tackon "keypath:" kc) (noreq)) (set foundkey 1) )
  771.  (if (exists (tackon "keyfiles:" kc) (noreq)) (set foundkey 1) )
  772.  
  773.  (if (= foundkey 0)
  774.   (set wantkey (askchoice  (choices #insregstuffno #insregstuff)
  775.                        (prompt #installerreg)
  776.                            (help #installerreg)
  777.                        (default 1)
  778.                )
  779.   )
  780.  
  781.   (set wantkey 0)
  782.  )
  783. )
  784.  
  785. (checkforkey)
  786.  
  787. (if (AND (exists "Register-AmTalk-2") (= wantkey 1))
  788.  (
  789.   (if (< (exists (tackon where "Register-AmTalk-2")) 2) (makedir (tackon where "Register-AmTalk-2") (infos)) )    
  790.   (if (exists "Register-AmTalk-2.info")
  791.     (copyfiles (source "Register-AmTalk-2.info") (dest where) (optional "nofail") ) 
  792.   )
  793.   (set whereR (tackon where "Register-AmTalk-2"))
  794.  
  795.  
  796.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" )
  797.                            (prompt "What Registration Files (Language) would you like to install?")
  798.                        (help   "What Registration Files (Language) would you like to install?")
  799.                         (default 0)
  800.                 )  
  801.   )
  802.  
  803.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  804.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  805.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  806.  
  807.   (if (exists "Register-AmTalk-2/RegistrationUtility") 
  808.     (copyfiles (source "Register-AmTalk-2/RegistrationUtility")
  809.                (dest whereR)
  810.                (infos)
  811.     )
  812.   )
  813.  
  814.   ;(if (exists (tackon "Register-AmTalk-2" (cat "Regtool-" basereg ".info")) )
  815.   ;  (copyfiles (source (tackon "Register-AmTalk-2" (cat "Regtool-" basereg ".info")) )
  816.   ;             (dest whereR) 
  817.   ;             (newname "RegistrationUtility.info")
  818.   ;  )
  819.   ;)
  820.  
  821.   (if (exists (tackon "Register-AmTalk-2" (cat "Reg_" basereg ".guide")) ) 
  822.     (copyfiles (source (tackon "Register-AmTalk-2" (cat "Reg_" basereg ".guide")))
  823.                (dest whereR) 
  824.                (infos)
  825.     )
  826.   )
  827.  
  828.   (if (exists (tackon "Register-AmTalk-2" (cat "Reg_" basereg ".doc")) )
  829.     (copyfiles (source (tackon "Register-AmTalk-2" (cat "Reg_" basereg ".doc")))
  830.                (dest whereR) 
  831.                (infos)
  832.     )
  833.   )
  834.  
  835.  
  836.  )
  837. )
  838.  
  839. ;********************************************************************
  840. ; copy rexx per author 
  841. ;********************************************************************
  842. (copylib (source "rexx/talk")
  843.          (dest "rexx:") 
  844.          (infos)
  845. )
  846.  
  847. ;********************************************************************
  848. ; Check on Setpatch 
  849. ;********************************************************************
  850. (set #updatesetpatch "\nThe installer looked for 'c:setpatch' and did not find it or you have a version lower then 40.16. AmTalk-2 needs version 40.16 to work correctly. You wany want to upgrade soon. (NOTE: if you keep 'setpatch' in a different place than 'c:' and its 40.16 or higher then this message is void.)")
  851.  
  852. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  853. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  854. (set current_setpatch "40.16")
  855. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  856.  
  857. ;********************************************************************
  858. ; End Bye 
  859. ;********************************************************************
  860. (exit #byebye)
  861.  
  862.